package cn.gzsf.csmall.product.controller;

import cn.gzsf.csmall.product.web.JsonResult;
import cn.gzsf.csmall.product.pojo.param.AttributeTemplateAddNewParam;
import cn.gzsf.csmall.product.service.IAttributeTemplateService;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/attribute-template")
@Api(tags = "06.属性模板管理模块")
public class AttibuteTemplateController {

    @Autowired
    private IAttributeTemplateService attributeTemplateService;

    @PostMapping("/add-new")
    @ApiOperation("添加属性模板")
    @ApiOperationSupport(order = 100)
    public JsonResult addNew(AttributeTemplateAddNewParam attributeTemplateAddNewParam) {
        attributeTemplateService.addNew(attributeTemplateAddNewParam);
        return JsonResult.ok();
    }
}
